using namespace std;
#include<signal.h>
#include<iostream>
#include<unistd.h>
void handler(int sig)
{
    cout << "Signal received: " << sig << endl;
}
int main()
{
    signal(2,handler);
    while(true)
    {
        cout<<"hello,world"<<endl;
        sleep(1);
    }
    return 0;
}